import { useState } from "react";

function Count (props) {
  const [count, setCount] = useState(() => {
    return props.count
  }) 
  return (
    <button onClick={ () => setCount(count + 1) }>{ count }</button>
  )
}

function App () {
  return (
    <div>
      <Count count={ 10 }></Count>
      <Count count={ 20 }></Count>
    </div>
  )
}

export default App;
